from common.connect_db import MyDB

my_db = MyDB()


class DataBaseStore:

    @staticmethod
    def get_store_stores_by_member_id(member_id):
        """
        通过会员ID找到商家的资金ID
        :param member_id:
        :return:
        """
        sql = "select * from store_stores where member_id ='%s' " % member_id
        result = my_db.execute_select(db_name='store', sql_text=sql)
        if len(result) == 1:
            return result[0]
        else:
            raise ValueError("查询不到对应资产！")
